Telegram Group & Telegram Channel
Custom Instruction Opcode Format

I'm having trouble finding a comprehensive description of how to encode/decode custom instructions in the official RISC-V docs or repos.

The opcode table shows :

https://preview.redd.it/4ef6jy09x50f1.png?width=931&format=png&auto=webp&s=bfe664d916a9b8f58f3c0e3a88fcf3b432dea4f7

\- First of all, I'm guessing SYSTEM is `b1110011 - but I could not find it explicitly stated in the above section, so I worked back from other instructions like MRET that also use SYSTEM.

\- I assume I can set bits 25:15 and 11:7 to anything? (e.g immediate value or register select?)

\- (func3 == 0) and (func16 & `b1000111 == `b100011) differentiates custom instructions from other SYSTEM instructions?

I don't think any custom opcodes are defined in the standard machine readable specifications. Are there any good forks that have custom instructions?
(e.g https://github.com/riscv/riscv-opcodes or https://github.com/riscv/sail-riscv )

(I was collecting machine readable specs here https://www.five-embeddev.com/quickref/machine-readable.html and could not find any other examples - are there any good machine readable references for custom opcodes?)



https://redd.it/1kk2grr
@r_riscv



tg-me.com/r_riscv/3293
Create:
Last Update:

Custom Instruction Opcode Format

I'm having trouble finding a comprehensive description of how to encode/decode custom instructions in the official RISC-V docs or repos.

The opcode table shows :

https://preview.redd.it/4ef6jy09x50f1.png?width=931&format=png&auto=webp&s=bfe664d916a9b8f58f3c0e3a88fcf3b432dea4f7

\- First of all, I'm guessing SYSTEM is `b1110011 - but I could not find it explicitly stated in the above section, so I worked back from other instructions like MRET that also use SYSTEM.

\- I assume I can set bits 25:15 and 11:7 to anything? (e.g immediate value or register select?)

\- (func3 == 0) and (func16 & `b1000111 == `b100011) differentiates custom instructions from other SYSTEM instructions?

I don't think any custom opcodes are defined in the standard machine readable specifications. Are there any good forks that have custom instructions?
(e.g https://github.com/riscv/riscv-opcodes or https://github.com/riscv/sail-riscv )

(I was collecting machine readable specs here https://www.five-embeddev.com/quickref/machine-readable.html and could not find any other examples - are there any good machine readable references for custom opcodes?)



https://redd.it/1kk2grr
@r_riscv

BY RISC-V Reddit




Share with your friend now:
tg-me.com/r_riscv/3293

View MORE
Open in Telegram


RISC V Reddit Telegram | DID YOU KNOW?

Date: |

The SSE was the first modern stock exchange to open in China, with trading commencing in 1990. It has now grown to become the largest stock exchange in Asia and the third-largest in the world by market capitalization, which stood at RMB 50.6 trillion (US$7.8 trillion) as of September 2021. Stocks (both A-shares and B-shares), bonds, funds, and derivatives are traded on the exchange. The SEE has two trading boards, the Main Board and the Science and Technology Innovation Board, the latter more commonly known as the STAR Market. The Main Board mainly hosts large, well-established Chinese companies and lists both A-shares and B-shares.

RISC V Reddit from us


Telegram RISC-V Reddit
FROM USA